how to display image in div using id in html

50

how to display image in div using id in html -

document.getElementById('imageDiv')
    .innerHTML = '<img src="imageName.png" />';

Comments

Submit
0 Comments